const router = require("koa-router")();
const alipay = require("../controller/alipay");
const alipayWap = require("../controller/alipayWap");
const queryOrderAlipay = require("../controller/queryOrderAlipay");

router.get("/", async (ctx, next) => {
  await ctx.render("index");
});
router.get("/paymentResult", async (ctx, next) => {
  await ctx.render("paymentResult");
});

// router.get("/api/*", async (ctx, next) => {
//   await next();
// });

router.get("/api/alipay", alipay);
router.get("/api/alipayWap", alipayWap);

router.get("/api/queryOrderAlipay", queryOrderAlipay);

module.exports = router;


// /api/alipay  GET
// 参数
// id  自己生成的 订单id
// subject  订单标题
// body  订单描述
// amount 订单总金额
  
// /api/queryOrderAlipay   GET
// 参数
// out_trade_no  // 订单号
